<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>kebab-case与PascalCase</title>
    <script src="vue.js"></script>
    <style>
        .book-list {
            border: 1px solid;
            padding: 20px;
            display: inline-block;
            background: rgb(56, 131, 216);
            color: #fff;
        }
    </style>
</head>
<body>
    <div id="app">
        <!-- kebab-case 注册可以用 kebab-case 使用 -->
        <people-list></people-list>

        <!-- kebab-case 注册不能用 PascalCase 使用 -->
        <!-- <PeopleList></PeopleList> -->

        <!-- PascalCase 注册可以用 kebab-case 使用 -->
        <book-item1></book-item1>
        <!-- PascalCase 注册在DOM中不能 PascalCase 使用 -->
        <BookItem2></BookItem2>

        <book-list></book-list>
    </div>
</body>
<script type="text/x-template" id="people-list">
    <ul>
        <li>tom</li>
        <li>jerry</li>
        <li>kevin</li>
    </ul>
</script>
<script>
    Vue.component('people-list',{
        template:'#people-list'
    })

    Vue.component('BookItem1',{
        template:'<div>书名：《西游记》</div>'
    })

    Vue.component('BookItem2',{
        template:'<div>书名：《三国演义》</div>'
    })
    //在字符串模版中使用PascalCase
    Vue.component('BookList',{
        template:`<ul class="book-list">
            <li><BookItem1></BookItem1></li>
            <li><BookItem2></BookItem2></li>
            </ul>`
    })


    let vm = new Vue({
        el:'#app'
    })
</script>
</html>